home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / dosisode / DOSISODE80.ZIP / ISODE8.WRK / UNIX / H / SYS / TTYCOM.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-19  |  3.8 KB  |  95 lines

  1. /*    @(#)ttycom.h 1.10 89/06/23 SMI    */
  2.  
  3. #ifndef    __sys_ttycom_h
  4. #define    __sys_ttycom_h
  5.  
  6. #ifndef    _POSIX_SOURCE
  7.  
  8. /*
  9.  * Window/terminal size structure.
  10.  * This information is stored by the kernel
  11.  * in order to provide a consistent interface,
  12.  * but is not used by the kernel.
  13.  *
  14.  * Type must be "unsigned short" so that types.h not required.
  15.  */
  16. struct winsize {
  17.     unsigned short    ws_row;        /* rows, in characters */
  18.     unsigned short    ws_col;        /* columns, in characters */
  19.     unsigned short    ws_xpixel;    /* horizontal size, pixels - not used */
  20.     unsigned short    ws_ypixel;    /* vertical size, pixels - not used */
  21. };
  22.  
  23. #define    TIOCGWINSZ    _IOR(t, 104, struct winsize)    /* get window size */
  24. #define    TIOCSWINSZ    _IOW(t, 103, struct winsize)    /* set window size */
  25.  
  26. /*
  27.  * Sun version of same.
  28.  */
  29. struct ttysize {
  30.     int    ts_lines;    /* number of lines on terminal */
  31.     int    ts_cols;    /* number of columns on terminal */
  32. };
  33.  
  34. #define    TIOCSSIZE    _IOW(t,37,struct ttysize)/* set tty size */
  35. #define    TIOCGSIZE    _IOR(t,38,struct ttysize)/* get tty size */
  36.  
  37. /*
  38.  * 4.3BSD and SunOS terminal "ioctl"s with no "termios" equivalents.
  39.  * This file is included by <sys/termios.h> and indirectly by <sys/ioctl.h>
  40.  * so that programs that include either one have these "ioctl"s defined.
  41.  */
  42. #define    TIOCSCTTY    _IO(t, 132)        /* get a ctty */
  43. #define    TIOCGPGRP    _IOR(t, 119, int)    /* get pgrp of tty */
  44. #define    TIOCGETPGRP    _IOR(t, 131, int)    /* get pgrp of tty (posix) */
  45. #define    TIOCSPGRP    _IOW(t, 118, int)    /* set pgrp of tty */
  46. #define    TIOCSETPGRP    _IOW(t, 130, int)    /* set pgrp of tty (posix) */
  47. #define    TIOCOUTQ    _IOR(t, 115, int)    /* output queue size */
  48. #define    TIOCSTI        _IOW(t, 114, char)    /* simulate terminal input */
  49. /*#define    TIOCNOTTY    _IO(t, 113)        /* void tty association */
  50. #define    TIOCPKT        _IOW(t, 112, int)    /* pty: set/clear packet mode */
  51. #define        TIOCPKT_DATA        0x00    /* data packet */
  52. #define        TIOCPKT_FLUSHREAD    0x01    /* flush data not yet written to controller */
  53. #define        TIOCPKT_FLUSHWRITE    0x02    /* flush data read from controller but not yet processed */
  54. #define        TIOCPKT_STOP        0x04    /* stop output */
  55. #define        TIOCPKT_START        0x08    /* start output */
  56. #define        TIOCPKT_NOSTOP        0x10    /* no more ^S, ^Q */
  57. #define        TIOCPKT_DOSTOP        0x20    /* now do ^S, ^Q */
  58. #define        TIOCPKT_IOCTL        0x40    /* "ioctl" packet */
  59. #define    TIOCMSET    _IOW(t, 109, int)    /* set all modem bits */
  60. #define    TIOCMBIS    _IOW(t, 108, int)    /* bis modem bits */
  61. #define    TIOCMBIC    _IOW(t, 107, int)    /* bic modem bits */
  62. #define    TIOCMGET    _IOR(t, 106, int)    /* get all modem bits */
  63. #define        TIOCM_LE    0001        /* line enable */
  64. #define        TIOCM_DTR    0002        /* data terminal ready */
  65. #define        TIOCM_RTS    0004        /* request to send */
  66. #define        TIOCM_ST    0010        /* secondary transmit */
  67. #define        TIOCM_SR    0020        /* secondary receive */
  68. #define        TIOCM_CTS    0040        /* clear to send */
  69. #define        TIOCM_CAR    0100        /* carrier detect */
  70. #define        TIOCM_CD    TIOCM_CAR
  71. #define        TIOCM_RNG    0200        /* ring */
  72. #define        TIOCM_RI    TIOCM_RNG
  73. #define        TIOCM_DSR    0400        /* data set ready */
  74.  
  75. #define    TIOCREMOTE    _IOW(t, 105, int)    /* remote input editing */
  76. #define    TIOCUCNTL    _IOW(t, 102, int)    /* pty: set/clr usr cntl mode */
  77.  
  78. /*
  79.  * Sun-specific ioctls with no "termios" equivalents.
  80.  */
  81. #define    TIOCTCNTL    _IOW(t, 32, int)    /* pty: set/clr intercept ioctl mode */
  82. #define    TIOCSIGNAL    _IOW(t, 33, int)    /* pty: send signal to slave */
  83. #define    TIOCCONS    _IO(t, 36)        /* get console I/O */
  84. #define    TIOCSSOFTCAR    _IOW(t, 101, int)    /* set soft carrier flag */
  85. #define    TIOCGSOFTCAR    _IOR(t, 100, int)    /* get soft carrier flag */
  86. #define    TIOCISPACE    _IOR(t, 128, int)    /* space left in input queue */
  87. #define    TIOCISIZE    _IOR(t, 129, int)    /* size of input queue */
  88.  
  89. #ifdef    sun386
  90. #define    TIOCSINTR    _IOW(t, 99, int)    /* set DOS interrupt number */
  91. #endif
  92.  
  93. #endif    /* !_POSIX_SOURCE */
  94. #endif    /* !__sys_ttycom_h */
  95.